package main

import (
	"fmt"
	"goway/base/pointer/unsafe/private"
	"unsafe"
)


func main() {

	person:=private.Person{}
	person.MakePerson("hkui",20)

	personPtr:=uintptr(unsafe.Pointer(&person))

	nameP:=(*string)(unsafe.Pointer(personPtr))

	firstSize:=unsafe.Sizeof(nameP)

	ageP:=(*int)(unsafe.Pointer(personPtr+firstSize))
	fmt.Printf("name=%s,age=%d\n",*nameP,*ageP)
}
